<!-- HTML header for doxygen 1.8.18-->
<!DOCTYPE html
    PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=9" />
    <meta name="generator" content="Doxygen 1.8.16" />
    <meta name="viewport" content="width=device-width, initial-scale=1" />
    <title>LEAF: tStack</title>
    <link href="tabs.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript" src="jquery.js"></script>
    <script type="text/javascript" src="dynsections.js"></script>
    <script type="text/javascript" src="../js/iframeResizer.contentWindow.min.js"></script>
    <!-- <script src="/js/template.js"></script> -->
     <link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
  $(document).ready(function() { init_search(); });
/* @license-end */
</script> 
    <link href="doxygen.css" rel="stylesheet" type="text/css" />
    <link href="customdoxygen.css" rel="stylesheet" type="text/css"/>
    <!-- <link rel="stylesheet" href="/css/tachyons.css" type="text/css" /> -->
</head>
<body class="bg-washed-green black-70 ph0 sans-serif" onload="iframeResizePipe()">
    <div>
        <!-- do not remove this div, it is closed by doxygen! -->
        <div id="titlearea">
            <table cellspacing="0" cellpadding="0">
                <tbody>
                    <tr>
                    </tr>
                </tbody>
            </table>
        </div>
        <!-- end header part -->
    </div>
</body>
</html><!-- Generated by Doxygen 1.8.16 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li class="current"><a href="modules.html"><span>Modules</span></a></li>
      <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li><a href="examples.html"><span>Examples</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
</div><!-- top -->
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">tStack<div class="ingroups"><a class="el" href="group__midi.html">MIDI</a></div></div>  </div>
</div><!--header-->
<div class="contents">

<p>A basic stack of integers with a fixed capacity of 128, used by tPoly to keep track of MIDI notes.  
<a href="#details">More...</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:ga0f59d25b2a62af281cb7e5a6337a662a"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__tstack.html#ga0f59d25b2a62af281cb7e5a6337a662a">tStack_init</a> (tStack *const stack, <a class="el" href="struct_l_e_a_f.html">LEAF</a> *const leaf)</td></tr>
<tr class="memdesc:ga0f59d25b2a62af281cb7e5a6337a662a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initialize a tStack to the default mempool of a <a class="el" href="struct_l_e_a_f.html" title="Struct for an instance of LEAF.">LEAF</a> instance.  <a href="group__tstack.html#ga0f59d25b2a62af281cb7e5a6337a662a">More...</a><br /></td></tr>
<tr class="separator:ga0f59d25b2a62af281cb7e5a6337a662a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gac6a330c5c8f6fc6138b22c157e527c81"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__tstack.html#gac6a330c5c8f6fc6138b22c157e527c81">tStack_initToPool</a> (tStack *const stack, tMempool *const pool)</td></tr>
<tr class="memdesc:gac6a330c5c8f6fc6138b22c157e527c81"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initialize a tStack to a specified mempool.  <a href="group__tstack.html#gac6a330c5c8f6fc6138b22c157e527c81">More...</a><br /></td></tr>
<tr class="separator:gac6a330c5c8f6fc6138b22c157e527c81"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gabf348064227f55c30cd2bcac3d899881"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__tstack.html#gabf348064227f55c30cd2bcac3d899881">tStack_free</a> (tStack *const stack)</td></tr>
<tr class="memdesc:gabf348064227f55c30cd2bcac3d899881"><td class="mdescLeft">&#160;</td><td class="mdescRight">Free a tStack from its mempool.  <a href="group__tstack.html#gabf348064227f55c30cd2bcac3d899881">More...</a><br /></td></tr>
<tr class="separator:gabf348064227f55c30cd2bcac3d899881"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga3b5483c9a7cd996e3c62ea9f0895437c"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__tstack.html#ga3b5483c9a7cd996e3c62ea9f0895437c">tStack_setCapacity</a> (tStack *const stack, uint16_t cap)</td></tr>
<tr class="memdesc:ga3b5483c9a7cd996e3c62ea9f0895437c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the capacity of the stack.  <a href="group__tstack.html#ga3b5483c9a7cd996e3c62ea9f0895437c">More...</a><br /></td></tr>
<tr class="separator:ga3b5483c9a7cd996e3c62ea9f0895437c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga909528e236aa47978e91227961841ab5"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__tstack.html#ga909528e236aa47978e91227961841ab5">tStack_addIfNotAlreadyThere</a> (tStack *const stack, uint16_t item)</td></tr>
<tr class="memdesc:ga909528e236aa47978e91227961841ab5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Add a value to the stack only if that value is not already in the stack.  <a href="group__tstack.html#ga909528e236aa47978e91227961841ab5">More...</a><br /></td></tr>
<tr class="separator:ga909528e236aa47978e91227961841ab5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gabd861307ff5e290b4ae8e45507b9903b"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__tstack.html#gabd861307ff5e290b4ae8e45507b9903b">tStack_add</a> (tStack *const stack, uint16_t item)</td></tr>
<tr class="memdesc:gabd861307ff5e290b4ae8e45507b9903b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Add a value to the stack.  <a href="group__tstack.html#gabd861307ff5e290b4ae8e45507b9903b">More...</a><br /></td></tr>
<tr class="separator:gabd861307ff5e290b4ae8e45507b9903b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga559464a399b9606909f9f57e190ead7b"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__tstack.html#ga559464a399b9606909f9f57e190ead7b">tStack_remove</a> (tStack *const stack, uint16_t item)</td></tr>
<tr class="memdesc:ga559464a399b9606909f9f57e190ead7b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Remove a single instance of a value from the stack.  <a href="group__tstack.html#ga559464a399b9606909f9f57e190ead7b">More...</a><br /></td></tr>
<tr class="separator:ga559464a399b9606909f9f57e190ead7b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga3d053d583ed2c643a1a4ea00818d4f8a"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__tstack.html#ga3d053d583ed2c643a1a4ea00818d4f8a">tStack_clear</a> (tStack *const stack)</td></tr>
<tr class="memdesc:ga3d053d583ed2c643a1a4ea00818d4f8a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Clear the stack.  <a href="group__tstack.html#ga3d053d583ed2c643a1a4ea00818d4f8a">More...</a><br /></td></tr>
<tr class="separator:ga3d053d583ed2c643a1a4ea00818d4f8a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga1684ca55f7c9d42e2994eed03b329700"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__tstack.html#ga1684ca55f7c9d42e2994eed03b329700">tStack_first</a> (tStack *const stack)</td></tr>
<tr class="memdesc:ga1684ca55f7c9d42e2994eed03b329700"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the first value in the stack.  <a href="group__tstack.html#ga1684ca55f7c9d42e2994eed03b329700">More...</a><br /></td></tr>
<tr class="separator:ga1684ca55f7c9d42e2994eed03b329700"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga995a3cb4b43476c387f4fd431af923ef"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__tstack.html#ga995a3cb4b43476c387f4fd431af923ef">tStack_getSize</a> (tStack *const stack)</td></tr>
<tr class="memdesc:ga995a3cb4b43476c387f4fd431af923ef"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the current size of the stack.  <a href="group__tstack.html#ga995a3cb4b43476c387f4fd431af923ef">More...</a><br /></td></tr>
<tr class="separator:ga995a3cb4b43476c387f4fd431af923ef"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga8ca0bdad1bce63d0da4cfa6e233ece98"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__tstack.html#ga8ca0bdad1bce63d0da4cfa6e233ece98">tStack_contains</a> (tStack *const stack, uint16_t item)</td></tr>
<tr class="memdesc:ga8ca0bdad1bce63d0da4cfa6e233ece98"><td class="mdescLeft">&#160;</td><td class="mdescRight">Check if the stack contains a value, and if it does, get the index of that value.  <a href="group__tstack.html#ga8ca0bdad1bce63d0da4cfa6e233ece98">More...</a><br /></td></tr>
<tr class="separator:ga8ca0bdad1bce63d0da4cfa6e233ece98"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga6e0aef2c8bc0f9432b7a2a6541f21550"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__tstack.html#ga6e0aef2c8bc0f9432b7a2a6541f21550">tStack_next</a> (tStack *const stack)</td></tr>
<tr class="memdesc:ga6e0aef2c8bc0f9432b7a2a6541f21550"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the next value in the stack, starting from the earliest added values.  <a href="group__tstack.html#ga6e0aef2c8bc0f9432b7a2a6541f21550">More...</a><br /></td></tr>
<tr class="separator:ga6e0aef2c8bc0f9432b7a2a6541f21550"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga15d80c513c339ff2c87fb96fcfca9353"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__tstack.html#ga15d80c513c339ff2c87fb96fcfca9353">tStack_get</a> (tStack *const stack, int index)</td></tr>
<tr class="memdesc:ga15d80c513c339ff2c87fb96fcfca9353"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the value at a given index of the stack.  <a href="group__tstack.html#ga15d80c513c339ff2c87fb96fcfca9353">More...</a><br /></td></tr>
<tr class="separator:ga15d80c513c339ff2c87fb96fcfca9353"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<p>A basic stack of integers with a fixed capacity of 128, used by tPoly to keep track of MIDI notes. </p>
<h2 class="groupheader">Function Documentation</h2>
<a id="ga0f59d25b2a62af281cb7e5a6337a662a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga0f59d25b2a62af281cb7e5a6337a662a">&#9670;&nbsp;</a></span>tStack_init()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void tStack_init </td>
          <td>(</td>
          <td class="paramtype">tStack *const&#160;</td>
          <td class="paramname"><em>stack</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="struct_l_e_a_f.html">LEAF</a> *const&#160;</td>
          <td class="paramname"><em>leaf</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Initialize a tStack to the default mempool of a <a class="el" href="struct_l_e_a_f.html" title="Struct for an instance of LEAF.">LEAF</a> instance. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">stack</td><td>A pointer to the tStack to initialize. </td></tr>
    <tr><td class="paramname">leaf</td><td>A pointer to the leaf instance. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="gac6a330c5c8f6fc6138b22c157e527c81"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gac6a330c5c8f6fc6138b22c157e527c81">&#9670;&nbsp;</a></span>tStack_initToPool()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void tStack_initToPool </td>
          <td>(</td>
          <td class="paramtype">tStack *const&#160;</td>
          <td class="paramname"><em>stack</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">tMempool *const&#160;</td>
          <td class="paramname"><em>mempool</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Initialize a tStack to a specified mempool. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">stack</td><td>A pointer to the tStack to initialize. </td></tr>
    <tr><td class="paramname">mempool</td><td>A pointer to the tMempool to use. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="gabf348064227f55c30cd2bcac3d899881"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gabf348064227f55c30cd2bcac3d899881">&#9670;&nbsp;</a></span>tStack_free()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void tStack_free </td>
          <td>(</td>
          <td class="paramtype">tStack *const&#160;</td>
          <td class="paramname"><em>stack</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Free a tStack from its mempool. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">stack</td><td>A pointer to the tStack to free. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="ga3b5483c9a7cd996e3c62ea9f0895437c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga3b5483c9a7cd996e3c62ea9f0895437c">&#9670;&nbsp;</a></span>tStack_setCapacity()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void tStack_setCapacity </td>
          <td>(</td>
          <td class="paramtype">tStack *const&#160;</td>
          <td class="paramname"><em>stack</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint16_t&#160;</td>
          <td class="paramname"><em>cap</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Set the capacity of the stack. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">stack</td><td>A pointer to the relevant tStack. </td></tr>
    <tr><td class="paramname">cap</td><td>The new capacity. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="ga909528e236aa47978e91227961841ab5"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga909528e236aa47978e91227961841ab5">&#9670;&nbsp;</a></span>tStack_addIfNotAlreadyThere()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int tStack_addIfNotAlreadyThere </td>
          <td>(</td>
          <td class="paramtype">tStack *const&#160;</td>
          <td class="paramname"><em>stack</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint16_t&#160;</td>
          <td class="paramname"><em>item</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Add a value to the stack only if that value is not already in the stack. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">stack</td><td>A pointer to the relevant tStack. </td></tr>
    <tr><td class="paramname">item</td><td>The value to be added. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="gabd861307ff5e290b4ae8e45507b9903b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gabd861307ff5e290b4ae8e45507b9903b">&#9670;&nbsp;</a></span>tStack_add()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void tStack_add </td>
          <td>(</td>
          <td class="paramtype">tStack *const&#160;</td>
          <td class="paramname"><em>stack</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint16_t&#160;</td>
          <td class="paramname"><em>item</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Add a value to the stack. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">stack</td><td>A pointer to the relevant tStack. </td></tr>
    <tr><td class="paramname">item</td><td>The value to be added. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="ga559464a399b9606909f9f57e190ead7b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga559464a399b9606909f9f57e190ead7b">&#9670;&nbsp;</a></span>tStack_remove()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int tStack_remove </td>
          <td>(</td>
          <td class="paramtype">tStack *const&#160;</td>
          <td class="paramname"><em>stack</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint16_t&#160;</td>
          <td class="paramname"><em>item</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Remove a single instance of a value from the stack. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">stack</td><td>A pointer to the relevant tStack. </td></tr>
    <tr><td class="paramname">item</td><td>The value to be removed. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="ga3d053d583ed2c643a1a4ea00818d4f8a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga3d053d583ed2c643a1a4ea00818d4f8a">&#9670;&nbsp;</a></span>tStack_clear()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void tStack_clear </td>
          <td>(</td>
          <td class="paramtype">tStack *const&#160;</td>
          <td class="paramname"><em>stack</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Clear the stack. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">stack</td><td>A pointer to the relevant tStack. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="ga1684ca55f7c9d42e2994eed03b329700"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga1684ca55f7c9d42e2994eed03b329700">&#9670;&nbsp;</a></span>tStack_first()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int tStack_first </td>
          <td>(</td>
          <td class="paramtype">tStack *const&#160;</td>
          <td class="paramname"><em>stack</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Get the first value in the stack. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">stack</td><td>A pointer to the relevant tStack. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The first value in the stack. </dd></dl>

</div>
</div>
<a id="ga995a3cb4b43476c387f4fd431af923ef"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga995a3cb4b43476c387f4fd431af923ef">&#9670;&nbsp;</a></span>tStack_getSize()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int tStack_getSize </td>
          <td>(</td>
          <td class="paramtype">tStack *const&#160;</td>
          <td class="paramname"><em>stack</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Get the current size of the stack. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">stack</td><td>A pointer to the relevant tStack. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The current size of the stack. </dd></dl>

</div>
</div>
<a id="ga8ca0bdad1bce63d0da4cfa6e233ece98"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga8ca0bdad1bce63d0da4cfa6e233ece98">&#9670;&nbsp;</a></span>tStack_contains()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int tStack_contains </td>
          <td>(</td>
          <td class="paramtype">tStack *const&#160;</td>
          <td class="paramname"><em>stack</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint16_t&#160;</td>
          <td class="paramname"><em>item</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Check if the stack contains a value, and if it does, get the index of that value. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">stack</td><td>A pointer to the relevant tStack. </td></tr>
    <tr><td class="paramname">item</td><td>The value to check against the stack. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The index of the value or -1 if the stack does not contain the value. </dd></dl>

</div>
</div>
<a id="ga6e0aef2c8bc0f9432b7a2a6541f21550"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga6e0aef2c8bc0f9432b7a2a6541f21550">&#9670;&nbsp;</a></span>tStack_next()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int tStack_next </td>
          <td>(</td>
          <td class="paramtype">tStack *const&#160;</td>
          <td class="paramname"><em>stack</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Get the next value in the stack, starting from the earliest added values. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">stack</td><td>A pointer to the relevant tStack. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The next value in the stack or -1 if there are no values in the stack. </dd></dl>

</div>
</div>
<a id="ga15d80c513c339ff2c87fb96fcfca9353"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga15d80c513c339ff2c87fb96fcfca9353">&#9670;&nbsp;</a></span>tStack_get()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int tStack_get </td>
          <td>(</td>
          <td class="paramtype">tStack *const&#160;</td>
          <td class="paramname"><em>stack</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>index</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Get the value at a given index of the stack. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">stack</td><td>A pointer to the relevant tStack. </td></tr>
    <tr><td class="paramname">index</td><td>The index of the stack from which to get a value. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The value at the given index. </dd></dl>

</div>
</div>
</div><!-- contents -->
<!-- HTML footer for doxygen 1.8.18-->
<!-- start footer part -->
</body>
</html>
